home *** CD-ROM | disk | FTP | other *** search
- #include <SpeechRecognition.h>
-
- OSErr MySetRejectedWordRefCon (SRRecognitionSystem mySystem);
-
-
- const long kRejectedWordRefCon = 'rejc';
-
- OSErr MySetRejectedWordRefCon (SRRecognitionSystem mySystem)
- {
- OSErr myErr = noErr;
- SRWord myRejectedWord = 0;
- Size myLen = sizeof (myRejectedWord);
-
- /* Get a reference to the rejected word */
- myErr = SRGetProperty (mySystem, kSRRejectedWord, &myRejectedWord, &myLen);
- /* Set the refcon of the rejected word, so we can */
- /* use it later when processing the search result */
- if (!myErr) myErr = SRSetProperty (myRejectedWord, kSRRefCon,
- &kRejectedWordRefCon, sizeof(kRejectedWordRefCon));
- /* Balance SRGetProperty */
- if (myRejectedWord) SRReleaseObject (myRejectedWord);
-
- return myErr;
- }